<?php

namespace api\controller;

use common\controller\VerifyController;
use common\service\NoteRecordService;
use think\Request;

class NoteRecordController extends VerifyController
{

    /**
     * @var NoteRecordService
     */
    protected $noteRecordService;

    public function __construct()
    {
        parent::__construct();
        $this->noteRecordService = NoteRecordService::getInstance();
    }

    /**
     * 获取需求记录列表
     * @param Request $request
     * @return \think\Response
     */
    public function getList(Request $request)
    {
        $param = $request->param()['param'];
        $page = $request->param()['param']['page'] ?? [1, C('default_page_total')];
        $resData = $this->noteRecordService->getList($param['filter'], $page);
        return json(success_response('', $resData));
    }
}
